Crate async_timer

source ·
Expand description

Async timer lib

§Accuracy

Regular timers that do not rely on async event loop tend to be on par with user space timers like in tokio. If that’s not suitable for you you should enable event loop based timers which in most cases give you the most accurate timers possible on unix platforms (See features.)

§Timers

§Primitives

  • Timed - A wrapper over future that allows to limit time for the future to resolve.
  • Interval - Periodic timer, that on each completition returns itself to poll once again with the same interval.

§Features

  • tokio1 - Enables event loop based timers using tokio, providing higher resolution timers on unix platforms.
  • c_wrapper - Uses C shim to create bindings to platform API, which may be more reliable than libc.
  • std - Enables usage of std types (e.g. Error)

Re-exports§

Modules§

Structs§

Functions§

  • Creates interval with default Platform timer.
  • Creates timed future with default Platform timer.